import axios from "@/utils/request";

// 导入mock文件
import '@/mock/goods'
import '@/mock/lurubook'
import '@/mock/affiche'
import '@/mock/reader'
import '@/mock/banner'

export function getGoodsListAPI(data:any){
    return axios({
        url:'/api/getGoodsList',
        method:'post',
        data
    })
}
export function getBookstAPI(data:any){
    return axios({
        url:'/api/searchbook',
        method:'post',
        data
    })
}
// 获取公告接口
export function getAfficheAPI(){
    return axios({
        url:'/api/getaffiche',
        method:'post',
    })
}
export function addAfficheAPI(data:any){
    return axios({
        url:'/api/addaffiche',
        method:'post',
        data
    })
}


// 办理借书模块，点击第一个扫描
export function getScanBookAPI(){
    return axios({
        url:'/api/getScanBook',
        method:'get',
    })
}

// 办理借书模块，点击第二个扫描
export function getScanBook2API(){
    return axios({
        url:'/api/getBook',
        method:'get',
    })
}
// 删除扫描出来的图书
export function deleteScanBook2API(params:any){
    return axios({
        url:'/api/deleteBook',
        method:'post',
        params
    })
}

// 读者管理获取读者列表
export function getReadersListAPI(){
    return axios({
        url:'/api/getReadersList',
        method:'get',
    })
}

// 删除读者
export function deleteReaderAPI(data:any){
    return axios({
        url:'/api/deleteReader',
        method:'post',
        data
    })
}


// 添加读者
export function addReaderAPI(data:any){
    return axios({
        url:'/api/addReader',
        method:'post',
        data
    })
}


// 编辑公告的接口
export function editAfficheAPI(data:any){
    return axios({
        url:'/api/editaffiche',
        method:'post',
        data
    })
}
// 删除公告接口
export function delAfficheAPI(data:any){
    return axios({
        url:'/api/deletaffiche',
        method:'post',
        data
    })
}

//获取轮播图接口
export function getBannerAPI(data:any){
    return axios({
        url:'/api/getbanner',
        method:'post',
        data
    })
}

// 书籍盘点
export function getstatisticsBook(){
    return axios({
        url:'/api/getstatisticsBook',
        method:'get',
    })
}